<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta name="viewport"
        content="width=device-width,initial-scale=1.0,maximum-scale=1.0,minimum-scale=1.0,user-scalable=no">
  <title>gshop</title>

<!--  <link rel="stylesheet" href="http://at.alicdn.com/t/font_1459402_rwx1gvfgqq.css" type="text/css" />-->
<!--  //我的样式文件-->
  <link rel="stylesheet" href="http://at.alicdn.com/t/font_1459402_1ma8b4nsdr4.css"></link>
<!--  //原样式文件-->
<!--  <link rel="stylesheet" href="http://at.alicdn.com/t/font_518606_6676bmcalnrhehfr.css"></link>-->

  <link rel="stylesheet" href="./static/css/reset.css">

  <script src="https://as.alipayobjects.com/g/component/fastclick/1.0.6/fastclick.js"></script>
  <script>
      if ('addEventListener' in document) {
          document.addEventListener('DOMContentLoaded', function () {
              FastClick.attach(document.body);
          }, false);
      }
      if (!window.Promise) {
          document.writeln('<script src="https://as.alipayobjects.com/g/component/es6-promise/3.2.2/es6-promise.min.js"' + '>' + '<' + '/' + 'script>');
      }
  </script>

  <!--  //百度地图API-->
  <script type="text/javascript">
      function initialize() {
          let geolocation = new BMap.Geolocation();
          geolocation.getCurrentPosition(function(r){
              if(this.getStatus() == BMAP_STATUS_SUCCESS){
                  // alert('您的位置：'+r.point.lng+','+r.point.lat);
                  window.Blongitude = r.point.lng;
                  window.Blatitude = r.point.lat;
                  console.log('HTML的输出 : ' + window.Blongitude);
              }
              else {
                  alert('failed'+this.getStatus());
              }
          });
      }

      function loadScript() {
          var script = document.createElement("script");
          script.src = "http://api.map.baidu.com/api?v=2.0&ak=HLCxKvkcZH2SDhZUWrMBfc2WighTIxaQ&callback=initialize";
          document.body.appendChild(script);
      }
      window.onload = loadScript;
  </script>




</head>
<body>
<div id="app"></div>
<!-- built files will be auto injected -->
</body>
</html>
